cmake_minimum_required(VERSION 3.21)
project(b_plus_db)

set(CMAKE_CXX_STANDARD 11)


add_executable(b_plus_db src/innodb/compact_data.h src/innodb/page.h src/innodb/page_header.h src/innodb/file_header.h src/enum/page_type.h src/innodb/compact_header.h src/innodb/compact_header.cpp src/innodb/file_header.cpp src/innodb/page_header.cpp src/innodb/page.cpp src/buffer/buffer.h src/innodb/b_plus_tree.cpp src/innodb/b_plus_tree.h src/innodb/compact_dir.h src/innodb/compact_only_id.h src/buffer/buffer.cpp src/common/stop_watch.h src/common/stop_watch.cpp src/server/test.cpp src/server/Server.cpp src/server/Server.h)

add_executable(b_plus_db_wqb_test test/wqbtest.cpp src/buffer/buffer.h src/buffer/buffer.cpp src/innodb/compact_data.h src/innodb/page.h src/innodb/page_header.h src/innodb/file_header.h src/enum/page_type.h src/innodb/compact_header.h src/innodb/compact_header.cpp src/innodb/file_header.cpp src/innodb/page_header.cpp src/innodb/page.cpp  src/innodb/b_plus_tree.cpp src/innodb/b_plus_tree.h src/innodb/compact_dir.h src/innodb/compact_only_id.h src/buffer/buffer_pool.cpp src/buffer/buffer_pool.h src/common/config.h src/common/stop_watch.h src/common/stop_watch.cpp)


add_executable(buffer_pool_test test/buffer_pool_test.cpp src/innodb/compact_data.h src/innodb/page.h src/innodb/page_header.h src/innodb/file_header.h src/enum/page_type.h src/innodb/compact_header.h src/innodb/compact_header.cpp src/innodb/file_header.cpp src/innodb/page_header.cpp src/innodb/page.cpp src/buffer/buffer.h src/buffer/buffer.cpp src/buffer/buffer_pool.cpp src/buffer/buffer_pool.h src/common/config.h src/common/stop_watch.h src/common/stop_watch.cpp test/flush_test.cpp src/buffer/flush_queue.h)



add_executable(wyk_test src/server/test.cpp src/server/Server.h src/server/Server.cpp src/buffer/buffer.h src/buffer/buffer.cpp src/innodb/compact_data.h src/innodb/page.h src/innodb/page_header.h src/innodb/file_header.h src/enum/page_type.h src/innodb/compact_header.h src/innodb/compact_header.cpp src/innodb/file_header.cpp src/innodb/page_header.cpp src/innodb/page.cpp  src/innodb/b_plus_tree.cpp src/innodb/b_plus_tree.h src/innodb/compact_dir.h src/innodb/compact_only_id.h src/buffer/buffer_pool.cpp src/buffer/buffer_pool.h src/common/config.h src/common/stop_watch.h src/common/stop_watch.cpp)


add_executable(client_test client.cpp src/server/Server.h src/server/Server.cpp src/buffer/buffer.h src/buffer/buffer.cpp src/innodb/compact_data.h src/innodb/page.h src/innodb/page_header.h src/innodb/file_header.h src/enum/page_type.h src/innodb/compact_header.h src/innodb/compact_header.cpp src/innodb/file_header.cpp src/innodb/page_header.cpp src/innodb/page.cpp  src/innodb/b_plus_tree.cpp src/innodb/b_plus_tree.h src/innodb/compact_dir.h src/innodb/compact_only_id.h src/buffer/buffer_pool.cpp src/buffer/flush_queue.h src/buffer/buffer_pool.h src/common/config.h src/common/stop_watch.h src/common/stop_watch.cpp)